package com.mjf.web.controller.common;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;

import com.mjf.cjt.domain.TmAccountDicEntity;
import com.mjf.cjt.service.TmAccountDicService;
import com.mjf.common.utils.ResponseUtils;
import com.mjf.common.utils.ResponseVO;
import com.mjf.system.service.vo.AccountDicReqVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * desc
 * </p>
 *
 * @author chenshoumeng
 * @date 2025/4/17 11:03
 */
@RestController
@RequestMapping("/cjt/dic")
public class CjtDicController {

    @Autowired
    private TmAccountDicService tmAccountDicService;

    @PostMapping("/account")
    public ResponseVO<List<TmAccountDicEntity>> getAccountList(@RequestBody AccountDicReqVO vo){
        return ResponseUtils.success(tmAccountDicService.list(Wrappers.<TmAccountDicEntity>lambdaQuery().in(TmAccountDicEntity::getCode,
            vo.getCodes())));
    }


}
